﻿
Type CIListener
	Field __Listener:byte ptr
	Field __notifyMaterialSetupPtr(passId:Int, mat:Byte ptr) = Null
	Field __notifyMaterialRenderPtr(passId:Int, mat:Byte ptr) = Null
		
	Method New()
		Self.__Listener = o_createCIListener()
	End Method
	
	
	Function notifyMaterialSetup(passId:Int, mat:Material) Abstract
	Function notifyMaterialRender(passId:Int, mat:Material) Abstract
	
		
	Method __setNotifyMaterialSetupPtr(func(passId:Int, mat:Byte ptr))
		Self.__notifyMaterialSetupPtr = func'Int(Byte ptr(func))
		o_setMaterialSetupPtr(Self.__Listener, Int(Byte ptr(Self.__notifyMaterialSetupPtr)))
	End Method
	
	
	Method __setNotifyMaterialRenderPtr(func(passId:Int, mat:Byte ptr))
		Self.__notifyMaterialRenderPtr = func
		o_setMaterialRenderPtr(Self.__Listener, Int(Byte ptr(Self.__notifyMaterialRenderPtr)))
	End Method
End Type